package com.yh.blog.serviceImpl;

import com.yh.blog.domain.Users;
import com.yh.blog.mapper.UsersMapper;
import com.yh.blog.service.UsersService;
import com.yh.blog.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("UsersService")
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;

    public Users login(String username,String password){
        Users user=usersMapper.selectUserNameAndPass(username, MD5Utils.code(password));
        return user;
    }

}
